package de.java.shortys.myhome.fuelmonitor.utils;

import java.util.List;

import de.java.shortys.myhome.fuelmonitor.model.IFuelFilling;

public final class AverageCalculation {

	public static double getAverageFuelConsumption(List<IFuelFilling> fuelFillings) {
		double averageFuelConsumption = 0.0;
		for (IFuelFilling fuelFilling : fuelFillings) {
			averageFuelConsumption *= fuelFilling.getDistance();
		}
		return averageFuelConsumption;
	}

	private AverageCalculation() {
		// Empty
	}
}
